Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

The README documented individual scripts but not the githubapi.py module that all scripts depend on.

Added comprehensive documentation section covering:

  • Module overview: Authentication, pagination, rate limiting, and GHAS alert access
  • GitHub class: Initialization patterns for github.com, GHES, custom CA bundles, and TLS options
  • Core methods: query(), list_code_scanning_alerts(), list_secret_scanning_alerts(), list_dependabot_alerts()
  • Utility functions: parse_date() with relative (7d) and absolute date formats
  • Error handling: Automatic rate limit backoff and connection error behavior

Example usage:

from githubapi import GitHub, parse_date

gh = GitHub()
since = parse_date("30d")

for alert in gh.list_secret_scanning_alerts(
    name="my-org",
    scope="org", 
    state="open",
    since=since
):
    print(f"{alert['secret_type']} in {alert['repository']['full_name']}")

Positioned between Requirements and Usage sections for logical flow from setup → library → scripts.

Original prompt

Please add documentation to README.md on how the githubapi.py works


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: aegilops <41705651+aegilops@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for githubapi.py in README.md Add githubapi.py module documentation to README Nov 18, 2025
Copilot AI requested a review from aegilops November 18, 2025 11:07
@aegilops aegilops marked this pull request as ready for review November 18, 2025 17:25
@aegilops aegilops requested a review from a team as a code owner November 18, 2025 17:25
@aegilops aegilops requested review from Copilot and felickz and removed request for a team November 18, 2025 17:25
@aegilops aegilops merged commit 6c2344e into main Nov 18, 2025
3 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive documentation for the githubapi.py module to the README. The module is a lightweight GitHub API client that all scripts in the repository depend on, and was previously undocumented.

Key changes:

  • Added new "The githubapi.py Module" section with detailed API documentation
  • Reorganized README structure by renaming "Usage" to "Scripts usage" for clarity
  • Documented the GitHub class, including initialization patterns, core methods, and utility functions
  • Provided complete usage examples showing how to use the module programmatically

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants